
//
//  LYshebeiViewController.m
//  音伴尔家听宝
//
//  Created by Burgess on 2017/4/7.
//  Copyright © 2017年 Burgess. All rights reserved.
//

#import "LYshebeiViewController.h"
#import "LYdevise.h"

@interface LYshebeiViewController ()

@end

@implementation LYshebeiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIScrollView *scroll = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
    scroll.backgroundColor = [UIColor whiteColor];
    scroll.contentSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height*2);
    
    [self.view addSubview:scroll];
    
    UIBarButtonItem * btn = [[UIBarButtonItem alloc]initWithTitle:@"添加设备" style:UIBarButtonItemStylePlain target:self action:NULL];
    [btn setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont boldSystemFontOfSize:14],NSFontAttributeName, nil] forState:UIControlStateNormal];
    btn.tintColor = LySystemColor;
    self.navigationItem.rightBarButtonItem = btn;


    LYdevise * deviseview = [[[NSBundle mainBundle]loadNibNamed:@"LYdevise" owner:NULL options:NULL]firstObject];
    deviseview.frame = CGRectMake((SCREEN_WIDTH - 358*(SCREEN_WIDTH/375))/2, 25, 358*(SCREEN_WIDTH/375), 115);
    deviseview.layer.borderWidth = 2;
    deviseview.layer.borderColor = LySystemColor.CGColor;
    deviseview.layer.cornerRadius = 10.0;
    
    deviseview.nameLabel.textColor = LySystemColor;
    deviseview.devisebtn.backgroundColor = LySystemColor;
    deviseview.devisebtn.layer.cornerRadius = 10;
    
    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"device_img"]];
    imageView.frame               = CGRectMake(0, 160, SCREEN_WIDTH, 950);
    
    [scroll addSubview:deviseview];
    [scroll addSubview:imageView];

}



@end
